<% content_for :title do %>
<%= :event_list_title.l%> - <%= :"event_state_#{@state}".l %>
<% end %>

<% form_tag(act_events_url(), {:class => 'list_form'}) do %>
<ul id="optionbar">
  <% if logged_in_as_manager? -%>
  <li><%= select_tag 'state', options_for_select(Event.state_map[@state].map{|state| [:"event_state_#{state}".l, state]}) %>
  <%= submit_tag :change_state.l %></li>
  <% end -%>
  <div class="clearing"></div>
</ul>

<div class="clearing">&nbsp;</div>

<table class="list">
  <thead>
    <tr>
      <th>&nbsp;</th>
      <th><%= :event_name.l %></th>
      <th><%= :event_start_date.l %></th>
      <th><%= :event_end_date.l %></th>
    </tr>
  </thead>
  <tbody>
<% resources.each do |event| -%>
    <tr>
      <td><%= check_box_tag "events[]", event.id, true, :id => "events_#{event.id}" %></td>
      <td><%= h event.name %></td>
      <td><%= event.start_date.localize %></td>
      <td><%= event.end_date.localize %></td>
    </tr>
<% end %>
  </tbody>
</table>
<script><!--
stripe('table.list tbody');
//--></script>
<% end -%>

